Model-based semantic text searching

ABSTRACT

Techniques and systems are described for performing semantic text searches. A semantic text-searching solution uses a machine learning system (such as a deep learning system) to determine associations between the semantic meanings of words. These associations are not limited by the spelling, syntax, grammar, or even definition of words. Instead, the associations can be based on the context in which characters, words, and/or phrases are used in relation to one another. In response to detecting a request to locate text within an electronic document associated with a keyword, the semantic text-searching solution can return strings within the document that have matching and/or related semantic meanings or contexts, in addition to exact matches (e.g., string matches) within the document. The semantic text-searching solution can then output an indication of the matching strings.

FIELD

This application is generally related to performing model-based semantictext searches using a model generated by a machine learning system. Forexample, aspects of this application relate to receiving inputcorresponding to a keyword and determining, using a model ofrepresentations of a set of words, words within the electronic documentthat are semantically related to the keyword.

BACKGROUND

Numerous applications, including word processing applications, webapplications, mobile applications, among others, enable users to performsearches for text within documents and/or user interfaces. For example,when viewing an electronic document displayed by an application, a usermay be able to open or activate a word search user interface (e.g., bypressing “Ctrl+F” on a keyboard). The word search user interface mayallow the user to enter a keyword containing one or more characters,words, phrases, etc. A text-searching system implemented by theapplication can then identify and return portions of text within thedocument that match or correspond to the keyword. In this way, the usercan navigate to portions of the document relevant to content of thekeyword.

Many existing solutions for searching for a keyword utilize or rely onstring matching. A string matching solution may return portions of adocument that directly match or include a string of text entered by auser. For example, if the user searches for the string “turn,” a stringmatching solution may return each instance of “turn” within a document,including words that contain the string “turn” in addition to othercharacters, such as “turns” and “turning.” While a string matchingapproach may return relevant results in some cases, the overallusefulness of such an approach may be limited. For example, a stringmatching solution may not return any results (or may return inaccurateresults) if a user spells a search query incorrectly, even by a singleletter. Similarly, a string matching solution may fail to return helpfulresults if a user enters a different version of a word included in adocument (such as “color” versus “colour” or “lives” versus “life”).

Some text-searching solutions may attempt to expand or broaden theresults returned by a string matching approach. For instance, atext-searching solution may implement stemming, which involvestruncating a search query (e.g., changing “studies” to “studi”). Inanother case, a text-searching solution may implement lemmatization,which involves identifying the base or lemma of a search (e.g., changing“studies” to “study”). Further, some text-searching solutions mayutilize dictionaries or thesauruses to search for words similar to atext query. However, these text-searching solutions may still fail toreturn many results that are relevant to a keyword. Specifically,existing text-searching solutions do not consider the semantic meaningor context of a keyword.

Semantic text search based systems and techniques are needed forreturning words within documents that are semantically related to anentered keyword.

SUMMARY

Techniques are described herein for performing model-based semantic textsearches. A semantic text-searching solution uses a machine learningsystem (such as a deep learning system) to determine associationsbetween the semantic meanings of words. These associations are notlimited by the spelling, syntax, grammar, or even definition of words.Instead, the associations can be based on the context in which strings(e.g., characters, words, phrases, etc.) are used in relation to oneanother. For example, the semantic text-searching solution may associatethe word “vehicle” with not only “vehicles” (as may be done by a stringmatching solution), but also with words such as “truck,”“transportation,” “DMV,” and “airplane.” As another example, thesemantic text-searching solution may associate the word “red” with“burgundy” (because burgundy is a variation of red), as well as “yellow”and “green” (because red, yellow, and green are commonly used togetherin connection with standard traffic lights). In response to detecting arequest to determine words within an electronic document that areassociated with a keyword, the semantic text-searching solution canreturn words within the document that have matching and/or relatedsemantic meanings or contexts, in addition to exact matches (e.g.,string matches) within the document. Further, the semantictext-searching solution can display indications of the matching wordswithin the document.

Additional features and advantages of the present application will beset forth in the description which follows, and in part will be obviousfrom the description, or may be learned by the practice of the examplesprovided herein.

This summary is not intended to identify key or essential features ofthe claimed subject matter, nor is it intended to be used in isolationto determine the scope of the claimed subject matter. The subject mattershould be understood by reference to appropriate portions of the entirespecification of this patent application, any or all drawings, and eachclaim.

The foregoing, together with other features and embodiments, will becomemore apparent upon referring to the following specification, claims, andaccompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

Illustrative embodiments of the present application are described indetail below with reference to the following drawing:

FIG. 1 is an illustration of an example word search user interfaceprovided by a string-based text search system, in accordance with someexamples provided herein;

FIG. 2 is an illustration of an example vector space, in accordance withsome examples provided herein;

FIG. 3 is a block diagram of an example semantic search system, inaccordance with some examples provided herein;

FIG. 4 is a block diagram of an example semantic search system, inaccordance with some examples provided herein;

FIG. 5 is an illustration of an example document and tokens of thedocument, in accordance with some examples provided herein;

FIG. 6A and FIG. 6B are illustrations of example word search userinterfaces provided by a semantic search system, in accordance with someexamples provided herein;

FIG. 7 is a block diagram of an example semantic search system, inaccordance with some examples provided herein;

FIG. 8 is a flowchart illustrating an example of a process of performinga semantic text search, in accordance with some examples providedherein;

FIG. 9 is an illustration of an example table that includes latency andpayload data associated with performing semantic text searches, inaccordance with some examples provided herein;

FIG. 10 is a flowchart illustrating an example of a process ofperforming a semantic text search, in accordance with some examplesprovided herein;

FIG. 11 is an example computing device architecture of an examplecomputing device that can implement the various techniques describedherein.

DETAILED DESCRIPTION

Certain aspects and embodiments of this disclosure are provided below.Some of these aspects and embodiments may be applied independently andsome of them may be applied in combination as would be apparent to thoseof skill in the art. In the following description, for the purposes ofexplanation, specific details are set forth in order to provide athorough understanding of embodiments of the application. However, itwill be apparent that various embodiments may be practiced without thesespecific details. The figures and description are not intended to berestrictive.

The ensuing description provides exemplary embodiments only, and is notintended to limit the scope, applicability, or configuration of thedisclosure. Rather, the ensuing description of the exemplary embodimentswill provide those skilled in the art with an enabling description forimplementing an exemplary embodiment. It should be understood thatvarious changes may be made in the function and arrangement of elementswithout departing from the spirit and scope of the application as setforth in the appended claims.

Numerous applications, including word processing applications, webapplications, mobile applications, among others, enable users to performsearches for strings or text (e.g., characters, words, phrases, etc.)within user interfaces. For example, when viewing an electronic documentdisplayed by an application, a user may be able to open or activate aword search user interface (e.g., by pressing “Ctrl+F” on a keyboard).The word search user interface may allow the user to enter a keywordcontaining one or more characters, words, phrases, etc. A text-searchingsystem implemented by the application can then identify and returnportions of text within the document that match or correspond to thekeyword. In this way, the user can navigate to portions of the documentrelevant to content of the keyword.

Many existing solutions for searching for a keyword utilize or rely onstring matching. A string matching solution may return portions of adocument that directly match or include a string entered by a user. Forexample, if the user searches for the string “turn,” a string matchingsolution may return each instance of “turn” within a document, includingwords that contain the string “turn” in addition to other characters,such as “turns” and “turning.” While a string matching approach mayreturn relevant results in some cases, the overall usefulness of such anapproach may be limited. For example, a string matching solution may notreturn any results (or may return inaccurate results) if a user spells asearch query incorrectly, even by a single letter. Similarly, a stringmatching solution may fail to return helpful results if a user enters adifferent version of a word included in a document (such as “color”versus “colour” or“lives” versus “life”).

Some text-searching solutions may attempt to expand or broaden theresults returned by a string matching approach. For instance, atext-searching solution may implement stemming, which involvestruncating a search query (e.g., changing “studies” to “studi”). Inanother case, a text-searching solution may implement lemmatization,which involves identifying the base or lemma of a search query (e.g.,changing “studies” to “study”). Further, some text-searching solutionsmay utilize dictionaries or thesauruses to search for words similar to akeyword. However, these text-searching solutions may still fail toreturn many results that are relevant to the keyword. For example,existing text-searching solutions do not consider the semantic meaningor context of the keyword.

Systems and related techniques are provided herein which providebenefits and solve one or more of the problems noted above by performingtext searches that return text or strings (e.g., words, characters,phrases, etc.) that are semantically related to entered keywords. Thesesystems and techniques can be generally divided into two components. Thefirst component relates to generating (e.g., training) a model thatrepresents semantic relationships between words. The second componentrelates to using the model to identify, within a document, text relevantto a user's query.

As used herein, a “semantic relationship” between two or more words (orother stings) refers to how the words are used contextually in relationto each other. For instance, two words that are semantically related toeach other may be used together (e.g., within the same sentence,paragraph, document, conversation, etc.) more frequently than two wordsthat have no semantic relationship (or are less semantically related).In another example, two semantically related words may have similarmeanings or definitions. As an illustrative example, the words “hill”and “mountain” may be semantically related because the two words havesimilar meanings. However, a semantic relationship is not limited ornecessarily defined by a word's definition (e.g., dictionary-baseddefinition). For instance, the words “hill” and “valley,” which havegenerally opposite definitions, may be semantically related due to bothwords describing geological features. In another illustrative example,the words “spy,” “espionage,” and “Roscoe H. Hillenkoetter” (the firstdirector of the Central Intelligence Agency) may be semanticallyrelated.

Referring to the first component of the disclosed semantictext-searching techniques, a machine learning system can be used togenerate the model for representing semantic associations between words.The machine learning system can include a deep learning network and/oralgorithm (e.g., including one or more neural networks), and/or anyadditional machine learning components or architectures. In one example,the model may include or be based on an open-source library, such asfastText. For instance, the semantic text-searching technique mayutilize the framework of fastText or a similar library to build a modelthat learns associations between words within a database (such asWikipedia articles written in a particular language). In other examples,the machine learning system may generate and/or train the model fromscratch without the use of a pre-configured library.

In some cases, the semantic text-searching technique may build the modelbased on text or string representations. An example of wordrepresentations are word embeddings (or character and/or phraseembeddings). A word embedding may include or correspond to a vectorrepresentation of a word within a predefined vector space. The vectorspace may have any number of dimensions (such as 100 dimensions, 300dimensions, or 500 dimensions). Within the vector space, words (orcharacters or phrases) with similar semantic meanings or contexts mayhave similar or nearby vectors. For instance, the numerical distancebetween the vector representations of two words with similar semanticmeanings may be less than the numerical distance between vectorrepresentations of two words with dissimilar or unrelated semanticmeanings. As an example, the vector representation of the word “red” maybe located within a subspace of the vector space that includes othercolors, such as “green” and “purple.” Within the subspace, the vectorrepresentation of “red” may be closer to the vector representation of“green” than the vector representation of “purple,” because red andgreen may have the additional association of being commonly referred totogether in connection with traffic lights. Such vector representationsmay be created or updated as word associations are discovered orrefined.

In some cases, the vector representations and/or other types ofrepresentations of words can be stored by a server that is incommunication with one or more end-user devices (e.g., client devices).In some cases, each of the one or more end-user devices can implementthe semantic text-searching system as an application or othermachine-executable program. For instance, an application on an end-userdevice may be configured with an interface that enables a user to inputa keyword as a request to determine corresponding portions of textwithin a document. Referring to the second component of the disclosedsemantic text-searching techniques, the application may prompt theserver to return a list of words within the document that aresemantically related (e.g., by at least a threshold degree) with thekeyword. In some cases, the server determines words that aresemantically related to a keyword by comparing the vector representationof the keyword with vector representations of unique tokens (e.g.,words, phrases, or characters) within the document. In one example, theapplication can send the document to the server and the server canidentify the tokens within the document. In other examples, theapplication can identify the tokens and send the tokens to the serveralong with the keyword. In some cases, the application can begincompiling a list of unique tokens within the document in response to theuser opening the document, or in response to the user initiating asearch (e.g., opening a word search user interface). In some cases, theapplication can identify tokens within a portion (e.g., one or twopages) of the document at a time, instead of processing the entiredocument in one call or action.

In addition, the application can dedupe the list of tokens (e.g., removeduplicate tokens) before sending the tokens to the server. In someimplementations, the application can locally use the tokens and thekeyword to determine words that are semantically related to the keyword.

The application may send the list of tokens from a document and/or thekeyword to the server in response to various contexts and/or input. Inone case, the application can send the list of tokens and the keywordafter determining that the user has entered at least a certain number(e.g., 2, 3, etc.) of characters into the word search user interface.Additionally or alternatively, the application can send the list oftokens and the keyword after determining that the user has not entered anew character into the word search user interface for a threshold periodof time (e.g., 100 milliseconds, 200 milliseconds, etc.). Suchstrategies may reduce the processing power and/or bandwidth consumedwhile making numerous (e.g., unnecessary) calls to the server. If theapplication detects that the user has entered a new character after thethreshold period of time, the application can send the updated keywordto the server. The application can also re-send the list of tokens inimplementations where the server does not save the tokens (e.g., toensure privacy of the document).

Once the server receives the token list and the keyword, the server candetermine vector representations of the token list and the keyword. Theserver can then determine the similarity between the keyword and thetoken list using one or more types of similarity metrics. For instance,the server can utilize a similarity function (such as a cosinesimilarity function) to determine a similarity score between the keywordand each token. Based on the similarity scores, the server can determinewhich tokens are semantically related to the keyword. For example, theserver can identify tokens whose similarity scores are at least athreshold score (e.g., a score of 0.4 on a scale of 0 to 1). In somecases, the server can identify a number (e.g., 4, 5, etc.) of tokenswith the highest similarity scores from the tokens that are equal to orgreater than the threshold score. The server can return the similartokens to the application, such as all tokens that are equal to orgreater than the threshold score or the number of tokens with thehighest similarity scores. After receiving the similar tokens from theserver, the application can indicate these tokens to the user (e.g., bydisplaying the words, phrases, etc. associated with the tokens). Forexample, the application can populate the word search user interfacewith the token and/or highlight the tokens within the document. In somecases, the word search user interface can also display string matchesthat include the text of the keyword.

FIG. 1 illustrates a word search user interface 102 that represents anexample of a string-based text-searching solution. The word search userinterface 102 may be displayed within a user interface that displays anelectronic document, displayed on top of the electronic document withinan additional user interface and/or integrated into the electronicdocument. In an illustrative example, the string-based text-searchingsolution may activate or otherwise display the word search userinterface 102 within an electronic document in response to detectinginput corresponding to a search request, such as a user pressing“Ctrl+F” on a keyboard or clicking on a search request button within atoolbar.

As shown in FIG. 1 , the word search user interface 102 includes asearch bar 104 into which a user can provide input corresponding to atext query or a search query (referred to herein as a keyword). Akeyword may include one or more characters, words, and/or phrases. Auser may provide input corresponding to a keyword using a variety ofinput mechanisms, such as providing the keyword via voice commandsand/or entering the keyword using a physical or digitally renderedkeyboard. In the example of FIG. 1 , the search bar 104 displays anentered keyword 106 corresponding to the text “pro.” In response todetecting this input, the string-based text search solution may searchthe electronic document to identify each portion of text that includethe string “pro.” The string-based text search solution may then returnindications of these words to the user. In the example of FIG. 1 , thestring-based text-searching solution may populate the word search userinterface 102 with matches 108 corresponding to words that include thekeyword 106. Because matches 108 include the exact string of the keyword106, matches 108 may be referred to as “exact matches.” While matches108 may be relevant to a user's search in some cases, matches 108 mayfail to include one or more additional words that may be relevant orotherwise helpful to a user due to the additional words having asemantic relationship with the keyword 106.

The disclosed semantic text-searching solutions can determine semanticrelationships between words in a variety of ways. In some cases, asemantic text-searching system may determine semantic relationshipsusing a word embedding model, which can include one or more techniquesfor latent semantic analysis, language modeling, and/or natural languageprocessing. In one example, a word embedding model may involverepresenting the semantic meaning of words with vector representationsdetermined within a multi-dimensional vector space. A vectorrepresentation may indicate the relative similarity between semanticfeatures of the word and semantic features of other words, and maytherefore be called a feature vector. FIG. 2 illustrates an examplevector space 202 that includes multiple feature vectors. In thisexample, the vector space 202 is three-dimensional. However, the vectorspaces used by the disclosed semantic text-searching systems may haveany suitable number of dimensions, such as 50 dimensions, 100dimensions, or 200 dimensions. As illustrated in FIG. 2 , the vectorspace 202 includes a vector 204, a vector 206, and a vector 208. Thesevectors may each correspond to a distinct word. In other examples, thevectors may correspond to any additional unit or element of language,such as one or more characters, words, and/or phrases (collectivelyreferred to as strings or text). For instance, the vectors maycorrespond to n-grams (phrases including n words) of any length.Further, the vector space 202 may include representations of any numberof words or n-grams, such as thousands, millions, or even billions ofwords.

The distances between the vectors 204, 206, and 208 correspond to thestrength of the semantic relationships between the vectors. Forinstance, the words represented by the vectors 204 and 206 may have astronger semantic relationship with each other than to the wordrepresented by the vector 208. Thus, a distance 205 between the vector206 and the vector 204 is shorter than a distance 207 between the vector204 and the vector 208. Similarly, the distance 205 is shorter than adistance 209 between the vector 206 and the vector 208. In anillustrative example, the vector space 202 may correspond to a subspaceof a larger vector space, the subspace including vector representationsof various animals. In this example, the vector 204 may represent theword “cow,” the vector 206 may represent the word “sheep,” and thevector 208 may represent the word “parrot.” The distance 205 may besmaller than the distances 207 and 209 because the words “cow” and“sheep” may be used more frequently together (for example, whendiscussing farms or farm animals) than together with the word “parrot.”

In some cases, the disclosed semantic text-searching solutions cangenerate and/or refine feature vectors of words using artificialintelligence (AI), such as a machine learning system or algorithm.Machine learning is a sub-area of AI in which a machine learning modelis trained to perform one or more specific tasks. For instance, amachine learning model is trained to perform a target task by relying onpatterns and inference learned from training data, without requiringexplicit instructions to perform the task. Machine learning models havebecome customary in many devices and systems for performing varioustasks, including categorizing data, translating text, detecting andpreventing cyber-attacks, recommending products, among others. In asemantic text-searching system, a word embedding model can be trained todetermine vector representations of semantically related words as closertogether within the vector space than feature vectors of semanticallyunrelated words. Words will be used herein as an illustrative example oftext or strings. However, one of ordinary skill will appreciate thatother text strings (e.g., foreign language characters or othercharacters, and/or other types of text) can be analyzed and processed byan embedding model using the techniques described herein. In some cases,the model can determine vector representations of a set of words,evaluate the quality of the vector representations (e.g., determine howaccurately the vector representations portray semantic relationships),and then update one or more parameters of the model to improve thequality of the vector representations. This training process may beperformed iteratively for any number of cycles, such as hundreds orthousands of cycles, or for a sufficient number of cycles for the modelto converge and/or be otherwise considered fully trained.

The word embedding model can be trained using a variety of types ofmachine learning algorithms and techniques. In one embodiment, the modelcan be trained using a deep learning algorithm, such as an algorithmincluding one or more neural networks. The term “neural network,” asused herein, can refer to a set of algorithms or steps designed torecognize patterns or relationships within a data set. Neural networksmay include an input layer, an output layer, and one or more hiddenlayers. The hidden layers can process data provided to the input layer,and the output layer can output the result of the processing performedby the hidden layers. In some cases, the hidden layers can include oneor more interconnected nodes. Each node can represent a piece ofinformation. Information associated with the nodes is shared among thedifferent layers and each layer retains information as information isprocessed.

In some cases, each node or interconnection between nodes can have oneor more tunable weights. Weights are a set of parameters derived fromthe training of the neural network. For example, an interconnectionbetween nodes can represent a piece of information learned about theinterconnected nodes. The interconnection can have a tunable weight thatcan be tuned during training (e.g., based on a training datasetincluding multiple training documents), allowing the neural network tobe adaptive to inputs and able to learn as more and more data isprocessed. Each weight can include a numeric value.

In some cases, a neural network can adjust the weights of the nodesusing backpropagation. For example, the neural network can adjust theweights of the nodes by processing a training document and thenanalyzing the difference between the actual output of the neural networkand the desired output of the neural network (e.g., using one or moreloss functions). When a neural network is being trained to generaterepresentations (e.g., semantic representations) of strings or text(e.g., a representation of a word or multiple words), the desired outputmay correspond to feature vectors that accurately portray semanticrelationships between the text (e.g., feature vectors that portraysemantic relationships between words). The weights of a neural networkmay be initially randomized before the neural network is trained. For afirst training iteration for the neural network, the output will likelyinclude values (e.g., feature vectors) that do not produce accurateand/or desired outputs. The process of processing training documents andupdating parameters of the neural network can be repeated for a certainnumber of iterations for each set of training documents until the neuralnetwork is trained well enough so that the weights (and/or otherparameters) of the layers are accurately tuned.

In some cases, the neural networks may be trained using an unsupervisedtraining process. In an unsupervised training process, it may not benecessary to label or categorize words within training documents. Insome examples, the neural networks may be trained using supervised orsemi-supervised training processes. Examples of neural networks that maybe utilized by a semantic text-searching system include convolutionalneural networks, recurrent neural networks, recursive neural networks,self-organizing maps, Boltzmann machines, autoencoders, among others.

After the word embedding model is trained, the model can be used todetermine representations of words input to the model. Using the modelto process new input data may be referred to as inference or roll-out.During inference, the model can receive a word or other n-gram and thenoutput a feature vector corresponding to the semantic meaning of theword. FIG. 3 illustrates an exemplary semantic search system 300 fortraining and using word embedding models. The semantic search system 300includes various components, including a training engine 302, an outputengine 304, training text 306, a model 308, word input 310, and afeature vector 312. The components of the semantic search system 300 caninclude software, hardware, or both. For example, in someimplementations, the components of the semantic search system 300 caninclude and/or can be implemented using electronic circuits or otherelectronic hardware, which can include one or more programmableelectronic circuits (e.g., microprocessors, graphics processing units(GPUs), digital signal processors (DSPs), central processing units(CPUs), and/or other suitable electronic circuits), and/or can includeand/or be implemented using computer software, firmware, or anycombination thereof, to perform the various operations described herein.The software and/or firmware can include one or more instructions storedon a computer-readable storage medium and executable by one or moreprocessors of the computing device implementing the semantic searchsystem 300.

While the semantic search system 300 is shown to include certaincomponents, one of ordinary skill will appreciate that the semanticsearch system 300 can include more or fewer components than those shownin FIG. 3 . For example, the semantic search system 300 can include, orcan be part of a computing device that includes, one or more inputdevices and one or more output devices (not shown). In someimplementations, the semantic search system 300 may also include, or canbe part of a computing device that includes, one or more memory devices(e.g., one or more random access memory (RAM) components, read-onlymemory (ROM) components, cache memory components, buffer components,database components, and/or other memory devices), one or moreprocessing devices (e.g., one or more CPUs, GPUs, and/or otherprocessing devices) in communication with and/or electrically connectedto the one or more memory devices, one or more wireless interfaces(e.g., including one or more transceivers and a baseband processor foreach wireless interface) for performing wireless communications, one ormore wired interfaces (e.g., a serial interface such as a universalserial bus (USB) input, a lightening connector, and/or other wiredinterface) for performing communications over one or more hardwiredconnections, and/or other components that are not shown in FIG. 3 .

As noted above, the semantic search system 300 can be implemented byand/or included in a computing device. In some cases, multiple computingdevices can be used to implement the semantic search system 300. Forexample, a computing device used to implement the semantic search system300 can include a personal computer, a tablet computer, a mobile device(e.g., a mobile phone or other mobile device), a wearable device (e.g.,a smart watch, a virtual reality headset, an augmented reality headset,and/or other wearable device), a server or multiple servers (e.g., in asoftware as a service (SaaS) system or other server-based system),and/or any other computing device with the resource capabilities toperform the techniques described herein.

In some implementations, the semantic search system 300 can beintegrated with (e.g., integrated into the software, added as one ormore plug-ins, included as one or more library functions, or otherwiseintegrated with) one or more software applications, such as a searchengine, a web browser, an application that displays text (e.g., AdobeExperience Manager™, Acrobat Desktop“, Acrobat Mobile™, Adobe Premiere”,Adobe Creative Cloud™, Adobe Illustrator™, Adobe Acrobat™, AdobePhotoshop™, Adobe After Effects™, among others), or other softwareapplication that allows a user (also referred to as an end-user) to viewand search for text. The software application can be a mobileapplication installed on a mobile device (e.g., a mobile phone, such asa smartphone, a tablet computer, a wearable device, or other mobiledevice), a desktop application installed on a desktop computer, aweb-based application that can be accessed using a web browser or otherapplication, or other software application. In some implementations, thesemantic search system 300 can be implemented in a suite of softwareapplications.

In some cases, the training engine 302 generates and/or trains model 308using training text 306. Training text 306 includes any set, collection,or corpus of text. Training text 306 may include any number or type oftext string, such as words, phrases, characters, and/or or othern-grams. For instance, the training text 306 can include millions orbillions of text strings, such as words or other n-grams. Training text306 may include a sufficient amount of text (e.g., a sufficient numberof different words used in various contexts) to train model 308 togenerate feature vectors that accurately represent semanticrelationships between words. In an illustrative example, training text306 may include all or a portion of a Wikipedia database correspondingto articles written in the same language. In some examples, the trainingengine 302 may use multiple databases corresponding to articles writtenin various languages to generate a set of models capable of determiningfeature vectors of words in the various languages. Training text 306 mayinclude any additional or alternative type of training text. In somecases, the training engine 302 may generate the model 308 by updatingand/or training an existing or previously generated library thatincludes a set of vector representations (or is configured to outputvector representations). In an illustrative example, the library mayinclude an open source library available to the public, such as fastTextor a similar library. Building a word embedding model by training anexisting library (instead of building a word embedding model fromscratch) may reduce the time and/or processing power involved intraining the model. However, in some cases, generating the model 308 mayinclude generating the library.

In some examples, the training engine 302 may train model 308 bydetermining how frequently one string, such as a word or other n-gram,is used together with one or more other strings (e.g., other words orother n-grams) within training text 306. For instance, the trainingmodel 308 may determine and/or analyze the rate at which two or morewords or other n-grams co-occur within documents or portions ofdocuments (e.g., sentences, paragraphs, etc.). As an illustrativeexample, the training engine 302 may determine that the word “spy” issemantically related to the word “espionage” based at least in part ondetermining that “spy” and “espionage” have a high rate (e.g., above athreshold rate) of co-occurrence within a group of documents (e.g., anumber of Wikipedia articles). For instance, the training engine 302 maydetermine that Wikipedia articles that contain the word “spy” are likelyto also contain the word “espionage” and, therefore, the two words aresemantically related. The training engine 302 may determine semanticrelationships between words using any additional or alternative analysisof training text 306.

The training engine 302 may train the model 308 to determine featurevectors of strings or n-grams including any number of words and/orcharacters. For instance, the training engine 302 may train the model308 to determine feature vectors corresponding to partial words (e.g.,strings of characters that do not make up an entire word). Additionallyor alternatively, the training engine 302 may train the model 308 todetermine feature vectors corresponding to multiple-word phrases, suchas “the Queen of England” or “time of day.” In some cases, training themodel 308 to determine feature vectors corresponding to multiple-wordphrases may include training the model 308 based on averages of featurevectors of individual words within the phrases. Further, the trainingengine 302 may train the model 308 to determine feature vectors of anytype or form of word or n-gram, such as verbs, prepositions, adjectives,nouns, pronouns, proper nouns, names, places, among others. In somecases, the training engine 302 may also train the model 308 to determinefeature vectors corresponding to misspelled words. For instance, thetraining engine 302 may configure the model 308 to detect when a wordinput to the model 308 is an incorrectly spelled version of a word knownto the model (such as “basktball” instead of “basketball”), rather thandisregarding the word as an unknown or unsupported word.

After the model 308 is sufficiently trained, the model 308 may receiveword input 310. Word input 310 may correspond to any string (e.g., wordor other n-gram) provided to the model 308 as part of a request todetermine a feature vector indicating semantic relationships between theword input 310 and other strings (e.g., words or other n-grams) used totrain the model 308. Based on word input 310, the output engine 304 mayoutput the feature vector 312 that represents the semanticrelationships. For instance, the output engine 304 may search the model308 to identify a feature vector corresponding to the word input 310.This process of outputting the feature vector 312 may be referred to asextracting the word embedding of the word input 310.

FIG. 4 is a diagram illustrating an example semantic search system 400for using a word embedding model to perform semantic text searches. Thesemantic search system 400 includes various components, including adetection engine 402, a token engine 404, a representation engine 406, amatch engine 408, an output engine 410, search input 412, tokens 414,representations 416, matches 418, and a search output 420. In somecases, the semantic search system 400 includes, implements, and/or is incommunication with all or a portion of the semantic search system 300illustrated in FIG. 3 .

In an illustrative example, at least a portion of the semantic searchsystem 400 may be implemented by a backend server or application serverthat trains and stores word embedding models (such as the model 308 ofFIG. 3 ). In this example, another portion of the semantic search system400 may be implemented by an end-user device (such as a personalcomputer, a tablet computer, or a mobile device) that is incommunication with the server and that runs an application configured toperform semantic text searches Examples of such an application includeAdobe Experience Manager™, Acrobat Desktop™, Acrobat Mobile™, AdobePremiere™, Adobe Creative Cloud™, Adobe Illustrator™ Adobe Acrobat™,Adobe Photoshop™, Adobe After Effects™, among others.

The semantic search system 400 may include any combination of software,hardware, or firmware. For example, in some implementations, thecomponents of the semantic search system 400 can include and/or can beimplemented using electronic circuits or other electronic hardware,which can include one or more programmable electronic circuits,processing devices, and/or can include and/or be implemented usingcomputer software, firmware, or any combination thereof, to perform thevarious operations described herein. The software and/or firmware caninclude one or more instructions stored on a computer-readable storagemedium and executable by one or more processors of the computing deviceimplementing the semantic search system 400. The semantic search system400 can include any additional or alternative component not shown inFIG. 4 .

The search input 412 may include any input corresponding to a request todetermine or locate text within an electronic document that isassociated with a keyword. In some cases, the search input 412 mayinclude initiation or activation of a search request. For instance, thesearch input 412 may include a user opening a word search user interface(similar to the word search user interface 102 illustrated in FIG. 1 ).As discussed in connection with FIG. 1 , the user may open a word searchuser interface by entering a command such as “Ctrl+F,” clicking a buttonto open the word search user interface, or in any additional mannerAdditionally or alternatively, the search input 412 may include one ormore characters of a keyword, including a portion of a keyword ormultiple keywords. For instance, the search input 412 may include textentered into a search bar of a word search user interface. In oneembodiment, the search input 412 may include the word input 310illustrated in FIG. 3 . Detection engine 402 may detect the search input412 in a variety of ways. In some examples, the detection engine 402 maydetect the search input 412 by periodically or continuously monitoring auser interface displaying an electronic document. For instance, thedetection engine 402 may monitor the user interface to detect activationof a word search user interface, and then monitor the word search userinterface to detect characters entered into the word search userinterface.

After the detection engine 402 detects all or a portion of the searchinput 412, the token engine 404 may generate a set of tokens 414 of theelectronic document. As used herein, the word “token” refers to a stringof one or more characters and/or words included within an electronicdocument. For instance, a token may include a prefix, suffix, set ofcharacters, word, and/or phrase. In some cases, a token may include ann-gram with a definable semantic meaning. For instance, a token mayinclude a group of words used in a specific order to portray a specificmeaning, rather than a random or arbitrary group of words. Some tokensmay include one or more punctuation marks (such as a hyphen).

The token engine 404 may generate tokens 414 in various ways and/orcontexts. In some cases, the token engine 404 may generate tokens 414 byscanning a document to identify each unique (e.g., distinct) tokenwithin the document. For instance, as the token engine 404 identifies atoken within the document, the token engine 404 may record and/or storethe token within a list. If the document includes more than one instanceof a token, the token engine 404 may remove repeated instances of thetoken from the list. The process of removing repeated tokens may bereferred to as deduplication or deduping. Further, in some cases, thetoken engine 404 may generate a set of tokens by analyzing a portion ofa document at a time. For instance, the token engine 404 may performseparate function calls to identify tokens within individual pages (or asmall number of pages) of a document, instead of executing a singlefunction call to identify each token within the entire document. Thisprocess may prevent an application that implements the semantic searchsystem 400 from crashing, becoming unresponsive, or otherwisemalfunctioning (especially when handling large documents, such asdocuments within hundreds of pages).

In some cases, the token engine 404 may generate the tokens 414 inresponse to the search input 412. For instance, the token engine 404 maygenerate the tokens 414 after the user has provided input to open theword search user interface, or after the user has provided inputcorresponding to one or more characters of a keyword. The token engine404 may generate the tokens 414 at any additional point in time or inresponse to additional input, such as input corresponding to the useropening the electronic document. For instance, to avoid delaying asemantic text search due to time required to generate the tokens 414(which may take several hundred milliseconds, for example), the tokenengine 404 may generate the tokens 414 immediately following the useropening, viewing, or otherwise accessing the electronic document.

FIG. 5 illustrates an exemplary document 502 and exemplary tokens 504 ofthe document 502 that may be generated by the semantic search system400. In this example, the tokens 504 include each 1-gram (e.g., singleword) and 2-gram (e.g., 2-word phrase) of the document 502.

Returning to FIG. 4 , after the tokens 414 are generated, therepresentation engine 406 may determine representations 416 of thetokens 414 and the keyword corresponding to the search input 412. Forinstance, the token engine 404 may send the keyword and the tokens 414to the representation engine 406 with a request to determinerepresentations 416. In some embodiments, the representation engine 406may determine the representations 416 by determining, based on a wordembeddings model, feature vectors corresponding to the keyword and eachof the tokens 414. If the keyword and/or any of the tokens 414 includemultiple-word phrases, the representation engine 406 may determinefeature vectors for the phrases by averaging feature vectors ofindividual words within the phrases.

The match engine 408 can determine matches 418 based on therepresentations 416. In some examples, the matches 418 may includerepresentations within the representation 416 that have at least apredetermined degree of similarity to the representation of the keyword.The match engine 408 can determine the similarity betweenrepresentations in various ways. In some cases, the match engine 408 maydetermine whether two representations are similar by determining adistance between feature vectors corresponding to the representationswithin a vector space. The match engine 408 can determine this distanceusing any type or form of distance or similarity measurement, such as acosine similarity measurement, a Euclidean distance measurement, orother similarity based measurement. In some cases, the match engine 408may determine the distance between the representation of the keyword andeach representation of the tokens 414 using the same similarity ordistance measurement. In one embodiment, the match engine 408 can thendetermine the matches 418 by identifying tokens that have above athreshold similarity to the keyword. As an illustrative example, if thematch engine 408 determines similarity measurements as values between 0and 1 with values closer to 1 indicating high similarity and numbersclose to 0 indicating low similarity, the match engine 408 may determinethe matches 418 by identifying tokens with a similarity measurement ofat least a 0.4, 0.5, etc. Additionally or alternatively, the matchengine 408 can determine the matches 418 by identifying a predeterminednumber of tokens (such as 4 or 5 tokens) or a predetermined percentageof tokens (such as 1% or 5%) most similar to the keyword.

After determining the matches 418, the match engine 408 can send thematches 418 to the output engine 410. The output engine 410 can thendisplay an indication of the matches 418 (corresponding to the searchoutput 420). The match engine 408 can display the search output 420within a user interface that displays the electronic document or withinan additional user interface. For instance, the match engine 408 candisplay the search output 420 by populating the word search userinterface into which the search input 412 was provided with wordscorresponding to the matches 418. In another example, the match engine408 can include the words within a user interface displayed on top of orbeside the electronic document. In further examples, the match engine408 can highlight all or a portion of the words within the electronicdocument. For instance, the match engine 408 can highlight each instanceof the matches 418 such that the semantics matches 418 are visible tothe user as the user views or scrolls through the electronic document.

FIG. 6A and FIG. 6B illustrate examples of word search user interfacesthat display indications of matches. Specifically, FIG. 6A includes aword search user interface 602 that includes a search bar 604 into whicha user has entered a keyword 606 corresponding to the word “vehicle.” Inthis example, the match engine 408 determines matches 610 thatcorrespond to the keyword 606 and the output engine 410 displaysindications of the matches 610 within the word search user interface602. In some cases, the output engine 410 can indicate the number ofeach of the matches 610 that are included within the electronicdocument. Additionally or alternatively, the output engine 410 canconfigure the indications of the matches 610 as links that direct theuser to locations of the matches 610 within the electronic document whenthe user clicks on or otherwise selects the indications. In someexamples, the output engine 410 can also include, within the word searchuser interface 602, string matches 608 corresponding to the keyword 606.String matches 608 may represent words within the electronic documentthat include the string corresponding to the keyword 606. The stringmatches 608 can be determined by the semantic search system 400 oranother search system implemented by the application displaying theelectronic document. Displaying indications of the string matches 608may increase the potential usefulness of the search results provided tothe user. As shown in FIG. 6A, the indications of the string matches 608may be displayed under an “exact matches” header and the indications ofthe matches 610 can be displayed under a “suggestions” header. As anadditional illustrative example of a word search user interface, FIG. 6Bincludes a word search user interface 612 that displays a keyword 614within a search bar 616, as well as string matches 618 and matches 620corresponding to the keyword 614.

FIG. 7 illustrates an exemplary semantic search system 700 forperforming semantic text searches. Specifically, FIG. 7 illustratesexemplary communication between an end-user device 702 and a server 704while the end-user device 702 and the server 704 perform the disclosedmethods for semantic text searches. In one embodiment, the end-userdevice 702 may include a personal computer, laptop, mobile device, orother type of end-user device that runs an application displaying anelectronic document. The application may be configured with one or moreengines of the semantic search system 400, such as the detection engine402, the token engine 404, and the output engine 410. The server 704 mayinclude an application server that is remote or external to the end-userdevice 702. For example, the end-user device and the server 704 maycommunicate via a network. In some cases, the server 704 can beconfigured with one or more engines of the semantic search system 400,such as the representation engine 406 and/or the match engine 408. Theserver 704 may also be configured with one or more engines of thesemantic search system 300, such as the training engine 302 and/or theoutput engine 304. However, the engines of the semantic search systems300 and 400 may be implemented in any combination across the end-userdevice 702 and/or the server 704, including being implemented on asingle device.

At step 706 shown in FIG. 7 , the end-user device 702 receives akeyword. For instance, the end-user device 702 can detect inputcorresponding to one or more characters of the keyword. In some cases,the end-user device 702 can determine that receiving the keywordrepresents a request to determine related text within the electronicdocument. At step 708, the end-user device 702 generates tokens of theelectronic document. Generating the tokens may be performed at any pointbefore or after receiving the keyword. For instance, the end-user device702 may generate the tokens in response to the electronic document beingopened or in response to detecting input corresponding to opening a wordsearch user interface.

At step 710, the end-user device 702 sends the keyword and the tokens tothe server 704. At step 712, the server 704 generates feature vectorscorresponding to the keyword and the tokens. The server 704 may generatethe feature vectors using a word embedding model trained and/or storedby the server 704. At step 714, the server 704 determines distancesbetween the feature vectors. For instance, the server 704 may determinea distance or similarity between a feature vector corresponding to thekeyword and each feature vector corresponding to the tokens. At step716, the server 704 determines matches corresponding to the keywordbased on nearby feature vectors. Specifically, the server 704 canidentify tokens corresponding to feature vectors that have at least apredetermined degree of similarity to the feature vector representingthe keyword. At step 718, the server 704 can return the matches to theend-user device 702 such that the end-user device 702 can displayindications of the matches (e.g., within the word search userinterface).

The steps illustrated in FIG. 7 as being performed on particular devicesare merely examples, and numerous variations are possible. For instance,the end-user device 702 may send the entirety of the electronic documentto the server 704 and direct the server 704 to generate the tokens.Additionally or alternatively, the end-user device 702 may generatefeature vectors corresponding to the tokens, or perform any additionalportion of implementing the word embedding model.

In some cases, it may be difficult to determine when a user has entereda complete keyword. For instance, at a point in time while the user isentering the keyword “maximum,” a search system may detect inputcorresponding to “max.” The search system is unaware of the user'sintention to extend the keyword. Thus, the search system may perform aninitial search based on the keyword “max,” and then perform a subsequentsearch once “maximum” has been entered. Performing such an initialsearch may facilitate fast search times if the keyword used in the firstsearch corresponds to the user's intended input. However, if multiplesearches are required (for example, due to the user typing slowly orentering a long keyword), bandwidth and processing power may be wastedperforming the searches.

Accordingly, the disclosed semantic search systems can detect, estimate,and/or predict a time when a user has completed entering a keyword andperform a semantic text search at that time. For instance, referring tothe semantic search system 400 of FIG. 4 , the detection engine 402 maydetermine an appropriate time to send a keyword and a list of tokens toa word embeddings model based on monitoring input corresponding to asearch. The token engine 404 may send the keyword and the list of tokensto the word embeddings model at the appropriate time.

FIG. 8 illustrates an exemplary process 800 for sending keywords andtokens to a semantic search service that implements a word embeddingmodel. At step 802 of the process 800, the detection engine 402 detectsinput corresponding to characters of a keyword. For example, thedetection engine 402 may detect the initial character entered and eachsubsequent character. At step 804, the detection engine 402 determineswhether a current number of characters of the keyword meets a characterthreshold (e.g., a character threshold number). The character thresholdmay be 2, 3, 4, or any suitable number of characters. While a highthreshold may result in fewer unnecessary calls to the semantic searchservice, a threshold that is too high may slow down or impede a search(e.g., if the complete keyword does not meet the threshold). If thedetection engine 402 determines that the keyword does not meet thecharacter threshold, the detection engine 402 may continue to monitorinput corresponding to characters of the search keyword. If thedetection engine 402 determines that the keyword meets the characterthreshold (or detects input corresponding to the keyword being complete,such as the user pressing “enter”), the process 800 proceeds to step806.

At step 806, the detection engine 402 determines whether a new characterof the keyword is input within a time threshold. In some cases, failingto detect new input within the time threshold may indicate that the userhas completed (or is likely to have completed) entering the keyword. Thetime threshold may be 100 milliseconds, 200 milliseconds, 300milliseconds, or any suitable amount of time. While a high timethreshold may reduce unnecessary calls to the semantic search service, athreshold that is too high may unnecessarily increase search latencies.If the detection engine 402 determines that a new character is inputwithin the time threshold, the detection engine 402 may continue tomonitor input corresponding to characters of the keyword. For instance,the detection engine 402 may reset a timer that counts to the timethreshold. If the detection engine 402 determines that a new characteris not input within the time threshold, the process 800 proceeds to step808. At step 808, the token engine 404 sends the keyword and a set oftokens to the semantic search service. If the detection engine 402detects input corresponding to new characters of the keyword after thekeyword and the set of tokens are sent to the semantic search service,the token engine 404 can send the updated keyword. The steps illustratedin FIG. 8 are merely examples, and any type or form of threshold orother decision mechanism may be used to determine when a keyword hasbeen completely entered.

As mentioned above, the token engine 404 may begin generating a set oftokens at any point while a user is interacting with an electronicdocument, such as when the document is opened and/or when the useractivates a word search user interface. If the token engine 404 has notcompleted generating a set of tokens when the detection engine 402determines that a keyword is complete (e.g., in response to determining“no” at step 806), the token engine 404 can send a partial set of tokens(e.g., the tokens that have been generated so far) to the semanticsearch service. After additional tokens have been generated (e.g., afterthe set of tokens is complete), the token engine 404 can send theadditional tokens. If the semantic search service does not store thepreviously sent tokens and/or keyword (e.g., for privacy or securitypurposes), the token engine 404 can re-send each token and keyword. Insome cases, the semantic search service may return initial searchresults corresponding to the partial set of tokens, and then returnsubsequent search results in response to receiving subsequent sets oftokens. Output engine 410 may display the initial search results, andthen update the displayed search results as more results are returned.While the initial search results may be incomplete, they may still oftenbe relevant or helpful to a user. Thus, “streaming” semantic searchresults in this manner may facilitate quickly providing the user withhigh quality semantic search results.

FIG. 9 illustrates an exemplary table 902 indicating the time and amountof data involved in performing the disclosed semantic text-searchingtechniques. Specifically, the table 902 indicates the token generationtime, token payload, and total search time for semantic searches ofdocuments including various numbers of pages. In some cases, generatinga set of tokens on an end-user device instead of a server thatimplements a word embeddings model may reduce the amount of data(corresponding to the token payload) sent to the server. In addition,generating the tokens on the end-user device may reduce the processingload of the server, which may reduce the total search time.

An example of a process performed using the techniques described hereinwill now be described. FIG. 10 is a flowchart illustrating an example ofa process 1000 for the disclosed semantic text search techniques. Atblock 1002, the process 1000 includes detecting input corresponding to arequest to locate text within an electronic document that is associatedwith a keyword included in the input. In some cases, the process 1000may include monitoring input provided to a word search user interface.For instance, the process 1000 can include detecting input prompting anapplication displaying the electronic document to open a word searchuser interface. In such an example, the input including the keyword canbe received from the word search user interface.

At block 1004, the process 1000 includes generating a set of tokens(e.g., unique tokens) of the electronic document, each tokencorresponding to one or more strings within the electronic document. Theset of tokens may be generated in response to detecting the inputcorresponding to the request to locate text within the electronicdocument that is associated with the keyword, or at any other time. Insome examples, the set of tokens can be generated by or on an end-userdevice displaying the electronic document. The set of tokens can be sentor forwarded to a server external to the end-user device that implementsthe machine learning system. In some examples, the input correspondingto the request to locate text within the electronic document that isassociated with the keyword includes a portion of the keyword. Sending(e.g., from the end-user device to the machine learning system), therequest to determine the one or more tokens within the electronicdocument that are associated with the keyword can include sending arequest to determine one or more tokens within the electronic documentthat are associated with the portion of the keyword. Receiving (e.g., atthe end-user device from the machine learning system), based on therequest, the at least one string within the electronic document that isassociated with the keyword can include receiving at least one stringwithin the electronic document that is associated with the portion ofthe keyword. The process 1000 can include detecting input correspondingto the entire keyword and sending (e.g., from the end-user device to themachine learning system) an additional request to determine one or moretokens within the electronic document that are associated with theentire keyword. The process 1000 can receive (e.g., at the client devicefrom the machine learning system), based on the additional request, atleast one additional string within the electronic document that isassociated with the entire keyword.

At block 1006, the process 1000 includes sending the keyword and the setof tokens to a machine learning system. The machine learning systemgenerates a representation of the keyword and a representation of eachtoken within the set of unique tokens. In some examples, the machinelearning system generates the feature vectors using a word embeddingmodel trained to map semantic meanings of words to feature vectors. Asnoted herein, a representation of a string (e.g., a word or words, aphrase, one or more characters, or other text string) is generated basedon contextual usage of the string in relation to other strings. In somecases, the representations may include feature vectors determined withina vector space. Strings (e.g., words) that have similar semanticmeanings and/or contextual usage may correspond to feature vectorslocated nearby each other within the vector space, and strings that havedissimilar semantic meanings and/or contextual usage may correspond tofeature vectors located far from each other within the vector space. Forexample, feature vectors of words that have similar contextual usage inthe training data are closer together within the vector space thanfeature vectors of words that have dissimilar contextual usage in thetraining data.

In some examples, the input corresponding to the request to locate textwithin the electronic document that is associated with the keywordincludes a number of characters of the keyword. For instance, the numberof characters can include a partial set of characters of all charactersof a word (e.g., “espion” for the word “espionage”). In some cases, theprocess 1000 includes sending the keyword and the set of tokens to themachine learning system in response to determining that the number ofcharacters of the keyword exceeds a threshold number. For example, thethreshold number of characters can include three characters, in whichcase the process 1000 can send the keyword and the set of tokens inresponse to detecting that three characters of a word have been entered(e.g., into the word search user interface). In some examples, theprocess 1000 can include detecting input corresponding to at least oneadditional character of the keyword and sending, to the machine learningsystem, the keyword that includes the additional character. The process1000 can receive, from the machine learning system based on the keywordthat includes the additional character, at least one additional stringwithin the electronic document that is associated with the keyword. Insome examples, the process 1000 includes sending the keyword and the setof tokens to the machine learning system in response to determining thatinput corresponding to an additional character of the keyword has notbeen detected within a threshold period of time following detection ofinput (e.g., into the word search user interface) corresponding to amost recently provided character of the keyword. For example, thethreshold period of time can include five seconds, in which case theprocess 1000 can send the keyword and the set of tokens in response todetecting that five seconds has passed since the input corresponding tothe most recently provided character of the keyword.

In some examples, generating the model for determining representationsof strings can includes training the model to determine feature vectorscorresponding to strings within a vector space. As noted herein, featurevectors of strings that have similar contextual usage in the trainingdata are closer together within the vector space than feature vectors ofstrings that have dissimilar contextual usage in the training data.

In some examples, the process 1000 can include forwarding a partial setof tokens of the electronic document before a complete set of tokens ofthe electronic document is generated. For instance, the machine learningsystem can determine at least one initial word within the electronicdocument that is associated with the keyword based on the partial set oftokens. The process 1000 can include forwarding the complete set oftokens once the complete set of tokens is generated. In such examples,the machine learning system can determine at least one additional wordwithin the electronic document that is associated with the keyword basedon the complete set of tokens.

At block 1008, the process 1000 includes receiving, from the machinelearning system, at least one string (e.g., at least one word, phrase,etc.) within the electronic document that is associated with thekeyword. The at least one string is associated with the keyword based onthe representation of the keyword having at least a threshold similarityto a representation of a token corresponding to the at least one string.In some cases, the machine learning system determines a similaritybetween the representation of the keyword and each representation ofeach token within the set of tokens by determining a distancemeasurement between a feature vector corresponding to the keyword and afeature vector corresponding to each token within the set of tokens. Forinstance, the machine learning system can determine that the at leastone string (e.g., word, etc.) is associated with the keyword based on afeature vector corresponding to the at least one string being less thana threshold distance from a feature vector corresponding to the keywordwithin the vector space. In some cases, the at least one string that isassociated with the keyword does not include a string corresponding tothe keyword. For example, the at least one string can include differentcharacters (e.g., letters) than the characters of the keyword (e.g., thekeyword can include the word “spy” and the at least one string caninclude the word “espionage”).

At block 1010, the process 1000 includes outputting an indication of theat least one word that is associated with the keyword. In some cases,outputting the indication includes displaying the at least one string(e.g., word, phrase, etc.) within the word search user interface. Insome examples, outputting the indication of the least one string that isassociated with the keyword includes highlighting each instance of theat least one string within the electronic document. In some examples,outputting the indication of the at least one string that is associatedwith the keyword includes displaying the at least one string within auser interface via which a user provided input corresponding to thekeyword (e.g., in the word search user interface). The process 1000 candetermine and output an indication of any number of strings that arerelated to the keyword. For instance, the process 1000 includesdetermining that at least one additional string within the electronicdocument includes the string corresponding to the keyword, andoutputting an additional indication of the at least one additionalstring.

In some examples, the processes described herein (e.g., the process 800,the process 1000, and/or other process described herein) may beperformed by a computing device or apparatus, such as a computing devicehaving the computing device architecture 1100 shown in FIG. 11 . In oneexample, the process 800 and/or process 1000 can be performed by acomputing device with the computing device architecture 1100implementing the semantic search systems 300, 400, and/or 500. Thecomputing device can include any suitable device, such as a mobiledevice (e.g., a mobile phone), a desktop computing device, a tabletcomputing device, a wearable device, a server (e.g., in a software as aservice (SaaS) system or other server-based system), and/or any othercomputing device with the resource capabilities to perform the processesdescribed herein, including the process 800 and/or process 1000. In somecases, the computing device or apparatus may include various components,such as one or more input devices, one or more output devices, one ormore processors, one or more microprocessors, one or moremicrocomputers, and/or other component that is configured to carry outthe steps of processes described herein. In some examples, the computingdevice may include a display (as an example of the output device or inaddition to the output device), a network interface configured tocommunicate and/or receive the data, any combination thereof, and/orother component(s). The network interface may be configured tocommunicate and/or receive Internet Protocol (IP) based data or othertype of data.

The components of the computing device can be implemented in circuitry.For example, the components can include and/or can be implemented usingelectronic circuits or other electronic hardware, which can include oneor more programmable electronic circuits (e.g., microprocessors,graphics processing units (GPUs), digital signal processors (DSPs),central processing units (CPUs), and/or other suitable electroniccircuits), and/or can include and/or be implemented using computersoftware, firmware, or any combination thereof, to perform the variousoperations described herein.

The processes 800 and 1000 are illustrated as a logical flow diagram,the operation of which represent a sequence of operations that can beimplemented in hardware, computer instructions, or a combinationthereof. In the context of computer instructions, the operationsrepresent computer-executable instructions stored on one or morecomputer-readable storage media that, when executed by one or moreprocessors, perform the recited operations. Generally,computer-executable instructions include routines, programs, objects,components, data structures, and the like that perform particularfunctions or implement particular data types. The order in which theoperations are described is not intended to be construed as alimitation, and any number of the described operations can be combinedin any order and/or in parallel to implement the processes.

Additionally, the processes described herein may be performed under thecontrol of one or more computer systems configured with executableinstructions and may be implemented as code (e.g., executableinstructions, one or more computer programs, or one or moreapplications) executing collectively on one or more processors, byhardware, or combinations thereof. As noted above, the code may bestored on a computer-readable or machine-readable storage medium, forexample, in the form of a computer program comprising a plurality ofinstructions executable by one or more processors. The computer-readableor machine-readable storage medium may be non-transitory.

FIG. 11 illustrates an example computing device architecture 1100 of anexample computing device which can implement the various techniquesdescribed herein. For example, the computing device architecture 1100can implement the semantic search systems 300, 400, and/or 600 shown inFIGS. 3, 4, and 6 , respectively. The components of computing devicearchitecture 1100 are shown in electrical communication with each otherusing connection 1105, such as a bus. The example computing devicearchitecture 1100 includes a processor 1110 (e.g., a CPU or otherprocessing unit) and computing device connection 1105 that couplesvarious computing device components including computing device memory1115, such as read only memory (ROM) 1120 and random access memory (RAM)1125, to processor 1110.

Computing device architecture 1100 can include a cache of high-speedmemory connected directly with, in close proximity to, or integrated aspart of processor 1110. Computing device architecture 1100 can copy datafrom memory 1115 and/or the storage device 1130 to cache 1112 for quickaccess by processor 1110. In this way, the cache can provide aperformance boost that avoids processor 1110 delays while waiting fordata. These and other modules can control or be configured to controlprocessor 1110 to perform various actions. Other computing device memory1115 may be available for use as well. Memory 1115 can include multipledifferent types of memory with different performance characteristics.Processor 1110 can include any general purpose processor and a hardwareor software service, such as service 1 1132, service 2 1134, and service3 1136 stored in storage device 1130, configured to control processor1110 as well as a special-purpose processor where software instructionsare incorporated into the processor design. Processor 1110 may be aself-contained system, containing multiple cores or processors, a bus,memory controller, cache, etc. A multi-core processor may be symmetricor asymmetric.

To enable user interaction with the computing device architecture 1100,input device 1145 can represent any number of input mechanisms, such asa microphone for speech, a touch-sensitive screen for gesture orgraphical input, keyboard, mouse, motion input, speech and so forth.Output device 1135 can also be one or more of a number of outputmechanisms known to those of skill in the art, such as a display,projector, television, speaker device, etc. In some instances,multimodal computing devices can enable a user to provide multiple typesof input to communicate with computing device architecture 1100.Communication interface 1140 can generally govern and manage the userinput and computing device output. There is no restriction on operatingon any particular hardware arrangement and therefore the basic featureshere may easily be substituted for improved hardware or firmwarearrangements as they are developed.

Storage device 1130 is a non-volatile memory and can be a hard disk orother types of computer readable media which can store data that areaccessible by a computer, such as magnetic cassettes, flash memorycards, solid state memory devices, digital versatile disks, cartridges,random access memories (RAMs) 1125, read only memory (ROM) 1120, andhybrids thereof. Storage device 1130 can include services 1132, 1134,1136 for controlling processor 1110. Other hardware or software modulesare contemplated. Storage device 1130 can be connected to the computingdevice connection 1105. In one aspect, a hardware module that performs aparticular function can include the software component stored in acomputer-readable medium in connection with the necessary hardwarecomponents, such as processor 1110, connection 1105, output device 1135,and so forth, to carry out the function.

The term “computer-readable medium” includes, but is not limited to,portable or non-portable storage devices, optical storage devices, andvarious other mediums capable of storing, containing, or carryinginstruction(s) and/or data. A computer-readable medium may include anon-transitory medium in which data can be stored and that does notinclude carrier waves and/or transitory electronic signals propagatingwirelessly or over wired connections. Examples of a non-transitorymedium may include, but are not limited to, a magnetic disk or tape,optical storage media such as compact disk (CD) or digital versatiledisk (DVD), flash memory, memory or memory devices. A computer-readablemedium may have stored thereon code and/or machine-executableinstructions that may represent a procedure, a function, a subprogram, aprogram, a routine, a subroutine, a module, a software package, a class,or any combination of instructions, data structures, or programstatements. A code segment may be coupled to another code segment or ahardware circuit by passing and/or receiving information, data,arguments, parameters, or memory contents. Information, arguments,parameters, data, etc. may be passed, forwarded, or transmitted via anysuitable means including memory sharing, message passing, token passing,network transmission, or the like.

In some embodiments the computer-readable storage devices, mediums, andmemories can include a cable or wireless signal containing a bit streamand the like. However, when mentioned, non-transitory computer-readablestorage media expressly exclude media such as energy, carrier signals,electromagnetic waves, and signals per se.

Specific details are provided in the description above to provide athorough understanding of the embodiments and examples provided herein.However, it will be understood by one of ordinary skill in the art thatthe embodiments may be practiced without these specific details. Forclarity of explanation, in some instances the present technology may bepresented as including individual functional blocks including functionalblocks comprising devices, device components, steps or routines in amethod embodied in software, or combinations of hardware and software.Additional components may be used other than those shown in the figuresand/or described herein. For example, circuits, systems, networks,processes, and other components may be shown as components in blockdiagram form in order not to obscure the embodiments in unnecessarydetail. In other instances, well-known circuits, processes, algorithms,structures, and techniques may be shown without unnecessary detail inorder to avoid obscuring the embodiments.

Individual embodiments may be described above as a process or methodwhich is depicted as a flowchart, a flow diagram, a data flow diagram, astructure diagram, or a block diagram. Although a flowchart may describethe operations as a sequential process, many of the operations can beperformed in parallel or concurrently. In addition, the order of theoperations may be re-arranged. A process is terminated when itsoperations are completed, but could have additional steps not includedin a figure. A process may correspond to a method, a function, aprocedure, a subroutine, a subprogram, etc. When a process correspondsto a function, its termination can correspond to a return of thefunction to the calling function or the main function.

Processes and methods according to the above-described examples can beimplemented using computer-executable instructions that are stored orotherwise available from computer-readable media. Such instructions caninclude, for example, instructions and data which cause or otherwiseconfigure a general purpose computer, special purpose computer, or aprocessing device to perform a certain function or group of functions.Portions of computer resources used can be accessible over a network.The computer executable instructions may be, for example, binaries,intermediate format instructions such as assembly language, firmware,source code, etc. Examples of computer-readable media that may be usedto store instructions, information used, and/or information createdduring methods according to described examples include magnetic oroptical disks, flash memory, USB devices provided with non-volatilememory, networked storage devices, and so on.

Devices implementing processes and methods according to thesedisclosures can include hardware, software, firmware, middleware,microcode, hardware description languages, or any combination thereof,and can take any of a variety of form factors. When implemented insoftware, firmware, middleware, or microcode, the program code or codesegments to perform the necessary tasks (e.g., a computer-programproduct) may be stored in a computer-readable or machine-readablemedium. A processor(s) may perform the necessary tasks. Typical examplesof form factors include laptops, smart phones, mobile phones, tabletdevices or other small form factor personal computers, personal digitalassistants, rackmount devices, standalone devices, and so on.Functionality described herein also can be embodied in peripherals oradd-in cards. Such functionality can also be implemented on a circuitboard among different chips or different processes executing in a singledevice, by way of further example.

The instructions, media for conveying such instructions, computingresources for executing them, and other structures for supporting suchcomputing resources are example means for providing the functionsdescribed in the disclosure.

In the foregoing description, aspects of the application are describedwith reference to specific embodiments thereof, but those skilled in theart will recognize that the application is not limited thereto. Thus,while illustrative embodiments of the application have been described indetail herein, it is to be understood that the inventive concepts may beotherwise variously embodied and employed, and that the appended claimsare intended to be construed to include such variations, except aslimited by the prior art. Various features and aspects of theabove-described application may be used individually or jointly.Further, embodiments can be utilized in any number of environments andapplications beyond those described herein without departing from thebroader spirit and scope of the specification. The specification anddrawings are, accordingly, to be regarded as illustrative rather thanrestrictive. For the purposes of illustration, methods were described ina particular order. It should be appreciated that in alternateembodiments, the methods may be performed in a different order than thatdescribed.

One of ordinary skill will appreciate that the less than (“<”) andgreater than (“>”) symbols or terminology used herein can be replacedwith less than or equal to (“≤”) and greater than or equal to (“≥”)symbols, respectively, without departing from the scope of thisdescription.

Where components are described as being “configured to” perform certainoperations, such configuration can be accomplished, for example, bydesigning electronic circuits or other hardware to perform theoperation, by programming programmable electronic circuits (e.g.,microprocessors, or other suitable electronic circuits) to perform theoperation, or any combination thereof.

The phrase “coupled to” refers to any component that is physicallyconnected to another component either directly or indirectly, and/or anycomponent that is in communication with another component (e.g.,connected to the other component over a wired or wireless connection,and/or other suitable communication interface) either directly orindirectly.

Claim language or other language reciting “at least one of” a set and/or“one or more” of a set indicates that one member of the set or multiplemembers of the set (in any combination) satisfy the claim. For example,claim language reciting “at least one of A and B” or “at least one of Aor B” means A, B, or A and B. In another example, claim languagereciting “at least one of A, B, and C” or “at least one of A, B, or C”means A, B, C, or A and B, or A and C, or B and C, or A and B and C. Thelanguage “at least one of” a set and/or “one or more” of a set does notlimit the set to the items listed in the set. For example, claimlanguage reciting “at least one of A and B” or “at least one of A or B”can mean A, B, or A and B, and can additionally include items not listedin the set of A and B.

The various illustrative logical blocks, modules, circuits, andalgorithm steps described in connection with the embodiments disclosedherein may be implemented as electronic hardware, computer software,firmware, or combinations thereof. To clearly illustrate thisinterchangeability of hardware and software, various illustrativecomponents, blocks, modules, circuits, and steps have been describedabove generally in terms of their functionality. Whether suchfunctionality is implemented as hardware or software depends upon theparticular application and design constraints imposed on the overallsystem. Skilled artisans may implement the described functionality invarying ways for each particular application, but such implementationdecisions should not be interpreted as causing a departure from thescope of the present application.

The techniques described herein may also be implemented in electronichardware, computer software, firmware, or any combination thereof. Suchtechniques may be implemented in any of a variety of devices such asgeneral purposes computers, wireless communication device handsets, orintegrated circuit devices having multiple uses including application inwireless communication device handsets and other devices. Any featuresdescribed as modules or components may be implemented together in anintegrated logic device or separately as discrete but interoperablelogic devices. If implemented in software, the techniques may berealized at least in part by a computer-readable data storage mediumcomprising program code including instructions that, when executed,performs one or more of the methods described above. Thecomputer-readable data storage medium may form part of a computerprogram product, which may include packaging materials. Thecomputer-readable medium may comprise memory or data storage media, suchas random access memory (RAM) such as synchronous dynamic random accessmemory (SDRAM), read-only memory (ROM), non-volatile random accessmemory (NVRAM), electrically erasable programmable read-only memory(EEPROM), FLASH memory, magnetic or optical data storage media, and thelike. The techniques additionally, or alternatively, may be realized atleast in part by a computer-readable communication medium that carriesor communicates program code in the form of instructions or datastructures and that can be accessed, read, and/or executed by acomputer, such as propagated signals or waves.

The program code may be executed by a processor, which may include oneor more processors, such as one or more digital signal processors(DSPs), general purpose microprocessors, an application specificintegrated circuits (ASICs), field programmable logic arrays (FPGAs), orother equivalent integrated or discrete logic circuitry. Such aprocessor may be configured to perform any of the techniques describedin this disclosure. A general purpose processor may be a microprocessor;but in the alternative, the processor may be any conventional processor,controller, microcontroller, or state machine. A processor may also beimplemented as a combination of computing devices, e.g., a combinationof a DSP and a microprocessor, a plurality of microprocessors, one ormore microprocessors in conjunction with a DSP core, or any other suchconfiguration. Accordingly, the term “processor,” as used herein mayrefer to any of the foregoing structure, any combination of theforegoing structure, or any other structure or apparatus suitable forimplementation of the techniques described herein.

What is claimed is:
 1. A method for model-based semantic text searches,comprising: detecting input corresponding to a request to locate textwithin an electronic document that is associated with a keyword includedin the input, wherein the input includes a number of characters of thekeyword; generating a set of tokens from the electronic document, eachtoken corresponding to one or more strings within the electronicdocument; sending the keyword and the set of tokens to a machinelearning system configured for semantic mapping in response todetermining that input corresponding to an additional character of thekeyword has not been detected within a threshold period of timefollowing detection of input corresponding to a most recently providedcharacter of the keyword, wherein the machine learning system generatesa representation of the keyword, a representation of each token withinthe set of tokens, and a representation of a string based on contextualusage of the string in relation to other strings in training data;receiving, from the machine learning system, at least one string withinthe electronic document that is associated with the keyword, the atleast one string being associated with the keyword based on therepresentation of the keyword having at least a threshold similarity toa representation of a token corresponding to the at least one string;and outputting an indication of the at least one string that isassociated with the keyword.
 2. The method of claim 1, furthercomprising detecting input prompting an application displaying theelectronic document to open a word search user interface, wherein theinput including the keyword is received from the word search userinterface.
 3. The method of claim 2, further comprising generating theset of tokens of the electronic document in response to detecting theinput prompting the application to open the word search user interface.4. The method of claim 1, wherein the input corresponding to the requestto locate text within the electronic document that is associated withthe keyword includes a number of characters of the keyword, and furthercomprising: sending the keyword and the set of tokens to the machinelearning system in response to determining that the number of charactersof the keyword exceeds a threshold number.
 5. The method of claim 4,further comprising: detecting input corresponding to at least oneadditional character of the keyword; sending, to the machine learningsystem, the keyword that includes the additional character; andreceiving, from the machine learning system based on the keyword thatincludes the additional character, at least one additional string withinthe electronic document that is associated with the keyword.
 6. Themethod of claim 1, wherein representations generated by the machinelearning system include feature vectors of words determined within avector space, and wherein feature vectors of words that have similarcontextual usage in the training data are closer together within thevector space than feature vectors of words that have dissimilarcontextual usage in the training data.
 7. The method of claim 6, whereinthe machine learning system generates the feature vectors using a wordembedding model trained to map semantic meanings of words to featurevectors.
 8. The method of claim 1, wherein: generating the set of tokensof the electronic document includes generating the set of tokens on anend-user device displaying the electronic document; and sending the setof tokens to the machine learning system includes forwarding the set oftokens to a server external to the end-user device that implements themachine learning system.
 9. The method of claim 1, wherein sending theset of tokens to the machine learning system includes: forwarding apartial set of tokens of the electronic document before a complete setof tokens of the electronic document is generated, wherein the machinelearning system determines at least one initial word within theelectronic document that is associated with the keyword based on thepartial set of tokens; and forwarding the complete set of tokens oncethe complete set of tokens is generated, wherein the machine learningsystem determines at least one additional word within the electronicdocument that is associated with the keyword based on the complete setof tokens.
 10. The method of claim 1, wherein outputting the indicationof the least one string that is associated with the keyword includeshighlighting each instance of the at least one string within theelectronic document.
 11. The method of claim 1, wherein outputting theindication of the at least one string that is associated with thekeyword includes displaying the at least one string within a userinterface via which a user provided input corresponding to the keyword.12. The method of claim 1, wherein the at least one string that isassociated with the keyword does not include a string corresponding tothe keyword.
 13. The method of claim 12, further comprising: determiningthat at least one additional string within the electronic documentincludes the string corresponding to the keyword; and outputting anadditional indication of the at least one additional string.
 14. Anend-user device configured for model-based semantic text searches,comprising: one or more processors; and memory accessible to the one ormore processors, the memory storing instructions, which upon executionby the one or more processors, cause the one or more processors to:detect, on the end-user device, input corresponding to a request tolocate text within an electronic document that is associated with akeyword included in the input, wherein the input includes a number ofcharacters of the keyword; generate, on the end-user device, a set oftokens from the electronic document, each token corresponding to one ormore strings within the electronic document; send in response todetermining that input corresponding to an additional character of thekeyword has not been detected within a threshold period of timefollowing detection of input corresponding to a most recently providedcharacter of the keyword, from the end-user device to a machine learningsystem configured for semantic mapping hosted on a server external tothe client device, a request to determine one or more tokens within theelectronic document that are associated with the keyword based ondetermining tokens with representations that have at least a thresholdsimilarity to a representation of the keyword; receive, at the end-userdevice from the machine learning system based on the request, at leastone string within the electronic document that is associated with thekeyword; and display, on the end-user device, an indication of the atleast one string that is associated with the keyword.
 15. The end-userdevice of claim 14, wherein: the input corresponding to the request tolocate text within the electronic document that is associated with thekeyword includes a portion of the keyword; sending, from the end-userdevice to the machine learning system, the request to determine the oneor more tokens within the electronic document that are associated withthe keyword includes sending a request to determine one or more tokenswithin the electronic document that are associated with the portion ofthe keyword; receiving, at the end-user device from the machine learningsystem based on the request, the at least one string within theelectronic document that is associated with the keyword includesreceiving at least one string within the electronic document that isassociated with the portion of the keyword, and further comprising:detecting input corresponding to the entire keyword; sending, from theend-user device to the machine learning system, an additional request todetermine one or more tokens within the electronic document that areassociated with the entire keyword; and receiving, at the client devicefrom the machine learning system based on the additional request, atleast one additional string within the electronic document that isassociated with the entire keyword.